-
Notifications
You must be signed in to change notification settings - Fork 51
Showcase: convert integration tests to gts/gjs #3326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
showcase/tests/integration/components/hds/accordion/index-test.gts
Outdated
Show resolved
Hide resolved
showcase/tests/integration/components/hds/accordion/index-test.gts
Outdated
Show resolved
Hide resolved
4ecc8f2 to
0837240
Compare
0837240 to
6055c04
Compare
6055c04 to
db90285
Compare
db90285 to
55ee921
Compare
55ee921 to
b2fcd3e
Compare
@alex-ju tests-support.css is a known issue and favicon.ico is just not linked in tests-index.html which is kinda pointless but could be done |
didoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have done my block of tests, and left a few comments. Nothing major, so I am approving it.
| await render( | ||
| hbs`<Hds::Dropdown::ListItem::Checkbox @id="id" @value="value">Checkbox item</Hds::Dropdown::ListItem::Checkbox>`, | ||
| <template> | ||
| {{! @glint-expect-error - testing invalid component usage (@id arg doesn't exist) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[question] technically is not invalid, the @id is read by the getElementId function. Does it mean that @id should be declared explicitly in the args definition of the HdsDropdownListItemCheckboxSignature?
(if so, also all the places where we use getElementId with an implicit @id argument?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the issue is that you can use id because of attribute forwarding, but there is no defined @id arg on the dropdown listitem checkbox / radio type signature. I wasn't sure if this was an intentional test, like maybe consumers think there is an @id arg or if it was just an incorrect usage of id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alex-ju what do you think of this case? (we would have a similar problem for some of the Form input elements, no?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, all those tests just use id
| await render( | ||
| hbs`<Hds::Dropdown::ListItem::Radio @id="id" @value="value">Radio item</Hds::Dropdown::ListItem::Radio>`, | ||
| <template> | ||
| {{! @glint-expect-error - testing invalid component usage (@id arg doesn't exist) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see other comment for the checkbox list item
📌 Summary
If merged, this PR updates the component integration tests to use the
gtsformat.The commits in the PR are organized as follows:
gjs(there were a couple that couldn't be automatically converted)gjstogtsThe changes include:
hbswrapper around what the test renders, instead using<template>tagsTrackedObject/Arrayinstead ofthis.set()beforeEachfor setting global values and instead defining things within the individual test contextadvanced-table/index(this was just to make the file more understandable)UPDATE
To make the ember matrix tests pass, I had to update the
gjstest files to not usethis.setanymore.REVIEWERS
Using the order of commits, you can click the link for the commit of the first component you are supposed to look at and then step through
If your section is looking good - please throw an approval on this PR, otherwise leave a comment.
🔗 External links
Jira ticket: HDS-XXX
👀 Component checklist
💬 Please consider using conventional comments when reviewing this PR.
📋 PCI review checklist
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.